import React from 'react';
import classNames from 'classnames';
import {Col} from 'antd';
import styles from './index.less';
import responsive from './responsive';

export default class ProfileCardItem extends React.PureComponent {
  render() {
    const {term, column, className, children, ...restProps} = this.props;
    const clsString = classNames(styles.description, className);

    return (
      <Col className={clsString} {...responsive[column]} {...restProps}>
        {term && <span className={styles.term}><span className={styles.termText}>{term}</span></span>}
        {children && <span className={styles.detail}>{children}</span>}
      </Col>
    );
  }
}
